Skip to content

Chemistry Interfaces for Krome, Uclchem, and KromeSph - #1282

Open
elkogerville wants to merge 153 commits into
amusecode:mainfrom
elkogerville:chemistry
Open

elkogerville wants to merge 153 commits into
amusecode:mainfrom
elkogerville:chemistry

Conversation

@elkogerville

@elkogerville elkogerville commented Sep 16, 2026

Copy link
Copy Markdown
Member

This PR adds Uclchem, Krome, and KromeSph as a community code in AMUSE.
This PR also adds the new ChemicalEvolutionInterface and other chemical evolution interfaces in src/amuse/community/interfaces/chem.py
Uclchem is a gas-grain chemical code for astrochemical modelling.

Implementation Notes

• Krome and Uclchem were rewritten to have near identical interfaces for similar user experiences
• Created new methods for chemistry specific operations:
get_abundances_by_name -> method that takes a list of species names as input and returns the corresponding abundances for that particle
get_abundance -> method that takes in a species index and returns the abundance for that specific species
set_abundance -> corresponding method that sets the abundance of a species for a particle
set_abundances -> vectorized method that can set the entire abundance array of a particle from a numpy array
• Added u.habing to units.py

Uclchem Notes:
• The interface is completely written in Python.
• The Uclchem version is pinned to the latest release v4.0.0
• Uses the new ChemicalEvolutionInterface

Krome Notes:
• Krome was already implemented in AMUSE but this PR refactors the interfaces to use ChemicalEvolutionInterface
• All fortran files were rewritten in modern fortran syntax for future maintainability.

KromeSph Notes:
• KromeSph is an alternate compilation of Krome more suitable for coupled hydrodynamical simulations with Krome.
• Temperature and number density particle attributes were replaced with internal energy and density for more seamless coupling with hydro codes via channels.
• Additional chemistry interface mixins in src/amuse/community/interfaces/chem.py were created to support this interface

Closes #1261
Also closes #1283

@elkogerville
elkogerville requested a review from a team as a code owner September 16, 2026 15:18
@elkogerville elkogerville added area: community_code Issue concerns a community code and/or its AMUSE bindings kind: feature request The issue requests a feature that AMUSE does not currently have area: interfaces Issues related to the standardised interfaces in amuse.community.interface and swappability of codes labels Sep 16, 2026
@elkogerville elkogerville moved this from Backlog to Open PRs in Development Board Sep 18, 2026
@elkogerville elkogerville self-assigned this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: community_code Issue concerns a community code and/or its AMUSE bindings area: interfaces Issues related to the standardised interfaces in amuse.community.interface and swappability of codes kind: feature request The issue requests a feature that AMUSE does not currently have

Projects

Status: Open PRs

Development

Successfully merging this pull request may close these issues.

ChemicalEvolutionInterface Create UCLCHEM interface for AMUSE

1 participant